package com.kaili.basic.export;

import cn.afterturn.easypoi.entity.vo.NormalExcelConstants;
import com.kaili.basic.bean.Tools;
import com.kaili.basic.pojo.entity.BaseLogExport;
import com.kaili.basic.service.BaseLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.List;

/**
 * Created by renzhikun on 18-7-4.
 */
@ExportNotice(name = "日志导出")
@Component
public class ExportBaseLog extends BaseExport {

    @Autowired
    private BaseLogService logService;

    @Override
    public HashMap doExport(HashMap parm) {
        HashMap ret = new HashMap();
        ret.put(NormalExcelConstants.CLASS, BaseLogExport.class);
        parm = (HashMap) Tools.trimHashMap(parm);

        List<BaseLogExport> list = logService.queryLogExport(parm);

        ret.put(NormalExcelConstants.DATA_LIST, list);
        return ret;
    }
}
